import { contractApiUrl, materialApiUrl } from '@/api/config'
import request2 from '@/utils/request2'

export default {

  addFile(data, params) {
    return materialApiUrl + '/materials/material-concrete-apply/addFile'
  },
  createByDetails(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/createByDetails', method: 'post', params, data
    })
  },
  createByMain(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/createByMain', method: 'post', params, data
    })
  },
  deleteByByDetailList(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/deleteByDetailList', method: 'post', params, data
    })
  },
  deleteByMain(data) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/deleteByMain', method: 'post', data
    })
  },
  deleteFile(data, params) {
    return materialApiUrl + '/materials/material-concrete-apply/deleteFile'
  },
  editByMain(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/editByMain', method: 'post', params, data
    })
  },
  editByByDetail(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/editByDetails', method: 'post', params, data
    })
  },
  findFileList(data, params) {
    return materialApiUrl + '/materials/material-concrete-apply/findFileList'
  },
  //-明细月计划物资弹出框
  findMonthDetailsByMonthId(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findMonthDetailsByMonthId', method: 'post', params, data
    })
  },
  findListByDetails(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/findListByDetails', method: 'post', params, data
    })
  },
  findListCount(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/findListCount', method: 'post', params, data
    })
  },
  findListByMain(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/findListByMain', method: 'post', params, data
    })
  },
  findListByMainId(data, params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/findListById/' + params.id, method: 'get', params, data
    })
  },
  getProjectByMonthPlan(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/getProjectByMonthPlan', method: 'get', params, data
    })
  },
  getMonthByProjectId(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/getMonthByProjectId/' + params.projectId, method: 'get', params, data
    })
  },
  print(params) {
    return request2({
      url: materialApiUrl + '/materials/material-concrete-apply/print/' + params.id, method: 'get', params
    })
  }
}